package com.airsystem.pos.bengkel.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author Budi Oktaviyan <budi.oktaviyan@icloud.com>
 */

@Entity
@Table(name = "tbl_kendaraan")
public class Kendaraan implements Serializable {

	@Id
	@Column(unique = true, nullable = false)
	private String merk;

	@OneToMany(mappedBy = "kendaraan", fetch = FetchType.LAZY)
	private Set<DetailKendaraan> detail_kendaraan = new HashSet<DetailKendaraan>(0);

	public String getMerk() {
		return merk;
	}

	public void setMerk(String merk) {
		this.merk = merk;
	}

	public Set<DetailKendaraan> getDetail_kendaraan() {
		return detail_kendaraan;
	}

	public void setDetail_kendaraan(Set<DetailKendaraan> detail_kendaraan) {
		this.detail_kendaraan = detail_kendaraan;
	}
}